package com.hydl.power.service;

import com.github.pagehelper.PageInfo;
import com.hydl.power.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.util.*;

/**
 * @author wxb
 * @date 2020/3/31 15:08
 */
public interface OrderDeliveryService {


    /**
     * 工单查询
     * @param pageNum
     * @param pageSize
     * @param begin
     * @param end
     * @param orderStatus
     * @param maintainerId
     * @param areaId
     * @param projectId
     * @param roomId
     * @return
     */
    PageInfo<OrderDelivery> getOrderDelivery(Integer pageNum,Integer pageSize,Long begin,Long end,Integer orderStatus,Integer maintainerId,String areaId,String projectId,String roomId);

    PageInfo<OrderDelivery> getAllOrderDeliveryTwo(Integer pageNum,Integer pageSize,String begin,String end,Integer orderStatus,Integer maintainerId,String areaId,String projectId,String roomId);

    /**
     * 事件记录 告警列表
     * @param pageNum
     * @param pageSize
     * @param begin
     * @param end
     * @param rank
     * @param faultTypes
     * @param orderStatus
     * @param roomName
     * @param deviceName
     * @param deviceAddress
     * @return
     */
    PageInfo<OrderDelivery> getIncidentRecord(Integer pageNum,Integer pageSize,Long begin,Long end,Integer rank,Integer faultTypes, Integer orderStatus,
                                               String roomName, String deviceName, String deviceAddress,String token);



    List<OrderDelivery> getList();

    int updateOrderStatusById(Integer id, Integer orderStatus);


    /**
     * 获取最新一条告警记录
     * @return
     */
    OrderDelivery getOrderDeliveryByfaultTime(String token);
    /**
     * 后台添加告警列表
     * @param fault
     * @return
     */
    int addIncidentRecordOrderDelivery(String ids,String fault);
    ArrayList<OrderDeliveryMenu> getTree();

    int updateflag(String orderDeliveryId);




    int batchUpdateOrderStatus(String orderDeliveryIds,Integer orderStatus);

    int batchUpdateOrderDelivery(String token);

    OrderDelivery getNewOrderDelivery(String token);

    OrderDelivery getOrderDelivery(String token);

    List<OrderDelivery> getOrderDeliveryByTotal(String token, Integer total);

    Integer getOrderDeliveryTotal(String token);
}
